package com.kingyun.gpsinspection.purificationservice.facade.service.som;

import com.kingyun.gpsinspection.purificationservice.facade.model.File;
import com.kingyun.gpsinspection.purificationservice.facade.model.som.*;

import java.util.List;

/**
 * Created by yangcs on 2017/5/3.
 */
public interface InfoflowService {

    /**
     * 获取工作动态
     * @param userId
     * @param offset
     * @param limit
     * @return
     */
    List<Infoflow> queryList(String userId, int offset, int limit);

    /**
     * 添加评论
     * @param userId
     * @param content
     * @param infoflowCommentId
     * @param infoflowId
     * @return
     */
    InfoflowComment addComment(String userId, String content, String infoflowCommentId, String infoflowId);

    /**
     * 点赞
     * @param userId
     * @param infoflowId
     * @return
     */
    InfoflowUser addPraise(String userId, String infoflowId);

    /**
     * 添加动态
     * @param infoflow
     * @return
     */
    Infoflow addInfoflow(Infoflow infoflow);

    /**
     * 完成工单是 添加工作动态
     * @param workOrderId
     * @param finishUser
     * @param finishTime
     * @param userId
     * @return
     */
    int addInfoflowByFinishOrder(String workOrderId, String finishUser, long finishTime, String userId, List<File> files);

    /**
     * web端获取工作动态
     * @param userId
     * @param offset
     * @param limit
     * @return
     */
    List<Dynamic> queryByParams(String userId, int limit, int offset);

    /**
     * 获取评论信息
     * @param infoflowCommentId
     * @return
     */
    InfoflowComment queryById(String infoflowCommentId);

    /**
     * 进站确认时，添加工作动态
     * @param stationIn
     */
    int addInfoflowByInOut(StationIn stationIn, File file);
}
